﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TDD.Shared.Engines
{
    public class CalculatorEngine
    {
        private List<int> _list;

        public CalculatorEngine()
        {
            _list = new List<int>();
        }

        public void SetInput(int input)
        {
            _list.Add(input);
        }

        public int Add()
        {
            //var result = 0;
            //foreach (var item in _list)
            //{
            //    result += item;
            //}
            //return result;

            return _list.Sum();
        }
    }
}
